package com.example.qxfw.ybzz.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.qx.Weather;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("qx")
public interface WeatherMapper extends BaseMapper {

    @Select("select DISTINCT id,weather, weatherid from weather where weather IS NOT NULL")
    List<Weather> selectWeather();

    @Select("select DISTINCT id,wind, weatherid from weather where wind IS NOT NULL")
    List<Weather> selectWind();

    @Select("select DISTINCT id,windd, weatherid from weather where windd IS NOT NULL")
    List<Weather> selectWindd();

    @Select("SELECT DISTINCT weatherid FROM weather WHERE weather LIKE CONCAT('%', #{fState}, '%')")
    String selectWeatherId(@Param("fState") String fState);
}


